package demo.teacher.impl;

import demo.student.Student;
import demo.teacher.AbstractTeacher;

import java.util.ArrayList;
import java.util.List;

/**
 * @author ZhouWeiBo
 * @create 2022/6/7
 */
public class Teacher extends AbstractTeacher {

    private List<Student> studentList = new ArrayList<>();


    @Override
    public void addStudent(Student student) {
        studentList.add(student);
    }

    @Override
    public void classBegin() {
        System.out.println("王老师：“好了同学们，上课啦！”");
        studentList.forEach(Student::standUp);
    }
}
